import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia'
import './assets/base.css'
import '@arco-design/web-vue/dist/arco.css'
import ArcoVue from '@arco-design/web-vue'
import ArcoVueIcon from '@arco-design/web-vue/es/icon'
import router from './router'
import 'virtual:uno.css'
import '@arco-design/web-vue/dist/arco.css'
import imgLazy from '@/directives/img-lazy'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import bgLazy from './directives/bg-lazy'

const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

app.use(ArcoVue)
app.use(ArcoVueIcon)
app.use(pinia)
app.use(router)

app.directive('img-lazy', imgLazy)
app.directive('bg-lazy', bgLazy)
app.mount('#app')

export default app
